---
id: get-facets
title: "Retrieve run or job facets for a run."
description: "Retrieve run or job facets for a run."
sidebar_label: "Retrieve run or job facets for a run."
hide_title: true
hide_table_of_contents: true
api:
  {
    "operationId": "getFacets",
    "description": "Retrieve run or job facets for a run.",
    "tags": ["Jobs"],
    "responses":
      {
        "200":
          {
            "description": "OK",
            "content":
              {
                "application/json":
                  {
                    "schema":
                      {
                        "type": "object",
                        "properties":
                          {
                            "runId":
                              {
                                "description": "The ID associated with the run modifying the table.",
                                "type": "string",
                              },
                            "facets":
                              {
                                "description": "A custom facet enables the extension of _dataset_, _job_, and _run_ metadata. A custom facet **must** also have a schema, where a version of the schema is identifiable via a URL. A field within the schema **must** not start with an underscore (`_`).",
                                "allOf":
                                  [
                                    {
                                      "description": "All base facet fields are prefixed with an underscore (`_`) to avoid field naming conflicts defined with other facets.",
                                      "type": "object",
                                      "properties":
                                        {
                                          "_producer":
                                            {
                                              "description": "URI identifying the producer of this metadata. For example this could be a git url with a given tag or sha",
                                              "type": "string",
                                              "format": "uri",
                                              "example": "https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client",
                                            },
                                          "_schemaURL":
                                            {
                                              "description": "The URL to the corresponding version of the schema definition following a $ref URL Reference (see https://swagger.io/docs/specification/using-ref/)",
                                              "type": "string",
                                              "format": "uri",
                                              "example": "https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/spec/OpenLineage.yml#MyCustomJobFacet",
                                            },
                                        },
                                      "required": ["_producer", "_schemaURL"],
                                      "title": "BaseFacet",
                                    },
                                    {
                                      "type": "object",
                                      "additionalProperties": true,
                                    },
                                  ],
                                "title": "CustomFacet",
                              },
                          },
                        "title": "FacetsResult",
                      },
                  },
              },
          },
      },
    "parameters":
      [
        {
          "name": "id",
          "in": "path",
          "description": "The ID of the run.",
          "required": true,
          "schema":
            {
              "type": "string",
              "format": "uuid",
              "example": "ea9badc5-7cb2-49af-9a9f-155771d3a797",
            },
        },
        {
          "name": "type",
          "in": "query",
          "description": "Indicates if should return job or run facets.",
          "required": true,
          "schema": { "type": "string", "enum": ["run", "job"] },
        },
      ],
    "method": "get",
    "path": "/jobs/runs/{id}/facets",
    "servers":
      [
        {
          "url": "http://localhost:5000/api/v1",
          "description": "Local API server",
        },
      ],
    "info":
      {
        "title": "Marquez",
        "version": "0.50.0",
        "description": "Marquez is an open source **metadata service** for the **collection**, **aggregation**, and **visualization** of a data ecosystem's metadata.",
        "license":
          {
            "name": "Apache 2.0",
            "url": "http://www.apache.org/licenses/LICENSE-2.0.html",
          },
      },
    "postman":
      {
        "name": "Retrieve run or job facets for a run.",
        "description":
          {
            "content": "Retrieve run or job facets for a run.",
            "type": "text/plain",
          },
        "url":
          {
            "path": ["jobs", "runs", ":id", "facets"],
            "host": ["{{baseUrl}}"],
            "query":
              [
                {
                  "disabled": false,
                  "description":
                    {
                      "content": "(Required) Indicates if should return job or run facets.",
                      "type": "text/plain",
                    },
                  "key": "type",
                  "value": "",
                },
              ],
            "variable":
              [
                {
                  "disabled": false,
                  "description":
                    {
                      "content": "(Required) The ID of the run.",
                      "type": "text/plain",
                    },
                  "type": "any",
                  "value": "",
                  "key": "id",
                },
              ],
          },
        "header": [{ "key": "Accept", "value": "application/json" }],
        "method": "GET",
      },
  }
sidebar_class_name: "get api-method"
info_path: docs/api/marquez
custom_edit_url: null
---

import ApiTabs from "@theme/ApiTabs";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import TabItem from "@theme/TabItem";

## Retrieve run or job facets for a run.

Retrieve run or job facets for a run.

<details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Path Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"name":"id","in":"path","description":"The ID of the run.","required":true,"schema":{"type":"string","format":"uuid","example":"ea9badc5-7cb2-49af-9a9f-155771d3a797"}}}></ParamsItem></ul></div></details><details style={{"marginBottom":"1rem"}} data-collapsed={false} open={true}><summary style={{}}><strong>Query Parameters</strong></summary><div><ul><ParamsItem className={"paramsItem"} param={{"name":"type","in":"query","description":"Indicates if should return job or run facets.","required":true,"schema":{"type":"string","enum":["run","job"]}}}></ParamsItem></ul></div></details><div><ApiTabs><TabItem label={"200"} value={"200"}><div>

OK

</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"runId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"The ID associated with the run modifying the table.","type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>facets</strong><span style={{"opacity":"0.6"}}> object</span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

All base facet fields are prefixed with an underscore (`_`) to avoid field naming conflicts defined with other facets.

</div><SchemaItem collapsible={false} name={"_producer"} required={true} schemaName={"uri"} qualifierMessage={undefined} schema={{"description":"URI identifying the producer of this metadata. For example this could be a git url with a given tag or sha","type":"string","format":"uri","example":"https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client"}}></SchemaItem><SchemaItem collapsible={false} name={"_schemaURL"} required={true} schemaName={"uri"} qualifierMessage={undefined} schema={{"description":"The URL to the corresponding version of the schema definition following a $ref URL Reference (see https://swagger.io/docs/specification/using-ref/)","type":"string","format":"uri","example":"https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/spec/OpenLineage.yml#MyCustomJobFacet"}}></SchemaItem><SchemaItem name={"property name*"} required={false} schemaName={"any"} qualifierMessage={undefined} schema={{"description":"All base facet fields are prefixed with an underscore (`_`) to avoid field naming conflicts defined with other facets.","type":"object","required":["_producer","_schemaURL"],"title":"BaseFacet","additionalProperties":true,"properties":{"_producer":{"description":"URI identifying the producer of this metadata. For example this could be a git url with a given tag or sha","type":"string","format":"uri","example":"https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client"},"_schemaURL":{"description":"The URL to the corresponding version of the schema definition following a $ref URL Reference (see https://swagger.io/docs/specification/using-ref/)","type":"string","format":"uri","example":"https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/spec/OpenLineage.yml#MyCustomJobFacet"}}}} collapsible={false} discriminator={false}></SchemaItem></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"runId\": \"string\",\n  \"facets\": {\n    \"_producer\": \"https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/client\",\n    \"_schemaURL\": \"https://github.com/OpenLineage/OpenLineage/blob/v1-0-0/spec/OpenLineage.yml#MyCustomJobFacet\"\n  }\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div>

